<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>

    <link href="./animate.css" type="text/css" rel="stylesheet" />
</head>
<!-- animate.css 是一个有趣，酷炫的，跨浏览器的动画库，里面包含了许多常用的css动画
    可使用cdn在线地址
    animated是要加的基本类

-->

<body>
    <div id="a">
        <input type="button" value="不使用动画出现a" @click='ametheds'>
        <transition enter-active-class='animated bounceIn' leave-active-class='animated bounceOut' :duration="{enter:200,leave:500}">
            <p v-if='ifappear '>{{a}}</p>
        </transition>


    </div>

    <script>
        var a = new Vue({
            el: '#a ',
            data: {
                a: "a",
                ifappear: false,

            },
            methods: {
                ametheds: function() {

                    this.ifappear = !this.ifappear;
                },

            }


        })
    </script>
</body>

</html>